package com.joinway.framework.extension.net.token;

import java.awt.Color;
import java.awt.Font;
import java.util.Arrays;
import java.util.List;

public class ImageTokenConfig {

	/**
	 * 图片宽度
	 */
	private int width = 90;
	
	/**
	 * 图片高度
	 */
	private int height = 20;
	
	/**
	 * 验证码个数
	 */
	private int count = 4;
	
	/**
	 * x坐标
	 */
	private int x = 15;
	
	/**
	 * y坐标
	 */
	private int y = 16;
	
	/**
	 * 可选字符
	 */
	private List<String> candidates = Arrays.asList(new String[]{ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", 
	           "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", 
	           "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }); 
	
	/**
	 * 前景色
	 */
	private Color foreColor = Color.WHITE;
	
	/**
	 * 背景色
	 */
	private Color backColor = Color.BLACK;
	
	/**
	 * 字体
	 */
	private Font font = new Font("Fixedsys", Font.BOLD, 18);
	
	/**
	 * 图片格式
	 */
	private String format = "jpeg";
	
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getHeight() {
		return height;
	}
	public void setHeight(int height) {
		this.height = height;
	}
	public List<String> getCandidates() {
		return candidates;
	}
	public void setCandidates(List<String> candidates) {
		this.candidates = candidates;
	}
	public Font getFont() {
		return font;
	}
	public void setFont(Font font) {
		this.font = font;
	}
	public Color getForeColor() {
		return foreColor;
	}
	public void setForeColor(Color foreColor) {
		this.foreColor = foreColor;
	}
	public Color getBackColor() {
		return backColor;
	}
	public void setBackColor(Color backColor) {
		this.backColor = backColor;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public String getFormat() {
		return format;
	}
	public void setFormat(String format) {
		this.format = format;
	}

}

